import re

def _getMatrix():
    matrix=[]
    for i in range(3):
        line_str=input()
        num_lst=re.split('\\s+',line_str)
        #print(num_lst)
        matrix.append([eval(num) for num in num_lst])
    return matrix

def _printMatrix(matrix):
    for i in range(len(matrix)-1):
        print(matrix[i][i],end=" ")
    print(matrix[len(matrix)-1][len(matrix)-1],end="")


if __name__ == '__main__':
    _printMatrix(_getMatrix())